<ul id="subjects">
<% BookCategory.find(:all).each do |c| %>
<li><%= link_to c.category_name, :action => "show_categories", :id => c.id %></li>
<% end %>
</ul>

<% if @books.blank? %>
<p>There are not any books currently in the system.</p>
<% else %>
<p>These are the current books in our system</p>

<%= form_tag(:method => 'get') do %>
  <p>
    <%= text_field_tag :search, params[:search] %>
    <%= submit_tag "Search", :title => nil %>
  </p>

<% end %>

<ul id="books">
<% @books.each do |c| %>
<li><%= link_to c.title, {:action => 'show', :id => c.id} -%> &nbsp; &nbsp; &nbsp;                      
<b> <%= link_to 'Edit', {:action => "edit",:id => c.id} %></b>
<b> <%= link_to "Delete", {:action => 'delete', :id => c.id}, :confirm => "Are you sure you want to delete this item?" %></b>
</li>
<% end %>
</ul>
<% end %>
<p><%= link_to "Add new Book", {:action => 'new' }%></p>